package test.peaksport.framework.metadata.entity;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonManagedReference;
import com.peaksport.framework.base.entity.BillBaseEntity;
import com.peaksport.framework.uuid.PKEntityType;

import lombok.Getter;
import lombok.Setter;

@SuppressWarnings("serial")
@Getter
@Setter
@Entity
@Table(name = "T_TST_BillHead")
public class TBillEntity extends BillBaseEntity {
	
	
	@JsonManagedReference
	@OneToMany(cascade = CascadeType.ALL)
    @JoinColumn(name = "FParentID")
    private List<TBillEntryEntity> entrys = new ArrayList<>();

	@Override
    public List<TBillEntryEntity> getEntrys() {
        return entrys;
    }

	
	@Override
	public PKEntityType getEntityType() {
		return PKEntityType.create("5CB69463");
	}
	


}
